package com.cgbl.cg.adapter

import com.cgbl.cg.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.robot.base.utils.pic.ImageLoaderUtils

class SearchAllUserAdapter :
    BaseQuickAdapter<String, BaseViewHolder>(R.layout.app_item_search_all_user) {
    override fun convert(holder: BaseViewHolder, item: String) {
        holder.setText(R.id.item_tv_name, if (holder.bindingAdapterPosition == data.size - 1) {
            context.getString(R.string.app_en_tips_86)
        } else {
            item
        })
        ImageLoaderUtils.displayCirclePortrait(
            context,
            holder.getView(R.id.item_iv_avatar),
            if (holder.bindingAdapterPosition == data.size - 1) {
                R.mipmap.app_ic_all_user
            } else {
                R.mipmap.app_ic_qq
            }

        )
    }
}